Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added help for action-alias match & execute #4174

Merged
merged 3 commits into from
Jun 12, 2018
Merged

Conversation

LindsayHill
Copy link
Contributor

@LindsayHill LindsayHill commented Jun 11, 2018

Adds help for st2 action-alias match and st2 action-alias execute.

Fixes #3171

Before:

extreme@EWC:~$ st2 action-alias match -h
usage: st2 action-alias match [-t TOKEN] [--api-key API_KEY] [-j] [-y] [-h]
                              [-a ATTR [ATTR ...]] [-w WIDTH [WIDTH ...]]
                              command
st2 action-alias match: error: too few arguments
extreme@EWC:~$ st2 action-alias execute -h
usage: st2 action-alias execute [-t TOKEN] [--api-key API_KEY] [-j] [-y] [-h]
                                [-u USER]
                                command
st2 action-alias execute: error: too few arguments
extreme@EWC:~$

After:

extreme@EWC:~$ st2 action-alias match -h
usage: st2 action-alias match [-h] [-t TOKEN] [--api-key API_KEY] [-j] [-y]
                              [-a ATTR [ATTR ...]] [-w WIDTH [WIDTH ...]]
                              command

Get the list of action aliases that match the command text.

positional arguments:
  command               Get the list of action alias that match the command
                        text.

optional arguments:
  -h, --help            show this help message and exit
  -t TOKEN, --token TOKEN
                        Access token for user authentication. Get
                        ST2_AUTH_TOKEN from the environment variables by
                        default.
  --api-key API_KEY     Api Key for user authentication. Get ST2_API_KEY from
                        the environment variables by default.
  -j, --json            Print output in JSON format.
  -y, --yaml            Print output in YAML format.
  -a ATTR [ATTR ...], --attr ATTR [ATTR ...]
                        List of attributes to include in the output. "all"
                        will return all attributes.
  -w WIDTH [WIDTH ...], --width WIDTH [WIDTH ...]
                        Set the width of columns in output.
extreme@EWC:~$ st2 action-alias execute -h
usage: st2 action-alias execute [-h] [-t TOKEN] [--api-key API_KEY] [-j] [-y]
                                [-u USER]
                                command

Execute the command text by finding a matching action alias.

positional arguments:
  command               Execute the command text by finding a matching action
                        alias.

optional arguments:
  -h, --help            show this help message and exit
  -t TOKEN, --token TOKEN
                        Access token for user authentication. Get
                        ST2_AUTH_TOKEN from the environment variables by
                        default.
  --api-key API_KEY     Api Key for user authentication. Get ST2_API_KEY from
                        the environment variables by default.
  -j, --json            Print output in JSON format.
  -y, --yaml            Print output in YAML format.
  -u USER, --user USER  User under which to run the action (admins only).
extreme@EWC:~$

@Kami Kami added this to the 2.8.0 milestone Jun 12, 2018
@Kami
Copy link
Member

Kami commented Jun 12, 2018

LGTM 👍

@LindsayHill LindsayHill merged commit 4cb8e6a into master Jun 12, 2018
@LindsayHill LindsayHill deleted the actionalias_help branch June 12, 2018 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants